Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filter reserved_numbers and reserved_names tuples when converting from gpb representation #111

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

cheng81
Copy link

@cheng81 cheng81 commented Dec 4, 2019

The current implementation mistakenly uses reserved_numbers tuples coming from gpb as proto3_msg, since the name in the tuple matches the one used in the proper message definition.
The commit simply skips over those tuples, since to the best of my knowledge they are useless in the generated code: those fields are by definition not mentioned in the protobuf message, hence they will never be either written or read.
This PR addresses #81

@cheng81 cheng81 changed the title filter tuples when converting from gpb representation filter reserved_numbers and reserved_names tuples when converting from gpb representation Dec 5, 2019
@cheng81
Copy link
Author

cheng81 commented Dec 5, 2019

I seriously can't find any valid reason to keep the {{:reserved_numbers, _}, _} and {{:reserved_names, _}, _} around, so in the latest commit I just filter them out in Protobuf.Parser directly, so they don't ever creep up in other parts of the code.

@cheng81
Copy link
Author

cheng81 commented Dec 9, 2019

@bitwalker any chance we can get this reviewed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant